package org.vidyakiran.app.client.view;

import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.ui.Panel;
import com.google.gwt.user.client.ui.TabPanel;

public class MainView {
    private TabPanel tabPanel = new TabPanel();
	private Panel mainPanel;
	private Panel bodyPanel;
	private HeaderView headerView;

	private TabView tabView;
	private HomeView homeView = new HomeView();
	private VolunteerView volunteerView= new VolunteerView();;
	private SchoolView schoolView=new SchoolView();
		
	public MainView() {
		/*headerView = new HeaderView();
		tabView = new TabView();
		homeView = new HomeView();
		volunteerView = new VolunteerView();
		schoolView = new SchoolView();*/
		
	}

	
	public TabPanel createMainView(){
		/*mainPanel = new VerticalPanel();@Override
		bodyPanel = new VerticalPanel();
		mainPanel.add(headerView.createHeaderPanel());
		mainPanel.add(tabView.createTabPanel());
		bodyPanel.add(homeView.createHomePanel());
		mainPanel.add(bodyPanel);
		return mainPanel;*/
		
		tabPanel.add(homeView.createHomePanel(), "Home");
		tabPanel.add(volunteerView.createVolunteerView(), "Volunteer");
		tabPanel.add(schoolView.createSchoolView(), "Schools");
		tabPanel.selectTab(1);
		tabPanel.setHeight(Window.getClientHeight()+"px");
		tabPanel.setWidth("100%");
		return tabPanel;
	}

	public Panel getMainPanel() {
		return mainPanel;
	}

	public Panel getBodyPanel() {
		return bodyPanel;
	}


	public HeaderView getHeaderView() {
		return headerView;
	}


	public TabView getTabView() {
		return tabView;
	}


	public HomeView getHomeView() {
		return homeView;
	}


	public VolunteerView getVolunteerView() {
		return volunteerView;
	}


	public SchoolView getSchoolView() {
		return schoolView;
	}

}
